<template>
	<view class="content">
		<u-navbar title="公司相册" :border-bottom="false"></u-navbar>
		<view class="u-flex u-row-between u-flex-wrap">
			<view class="content_image" v-for="(item,index) in data.list" :key="index">
				<u-image :src="item.img_src" width="100%" height="100%" @click="previewImage(item.img_src)"></u-image>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		reactive
	} from "vue";
	const data = reactive({
		list: []
	})
	onLoad(({
		album
	}) => {
		data.list = JSON.parse(album)
	})
	const previewImage = (img) => {
		uni.previewImage({
			urls: [img],
		});
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 0 32rpx;

		&_image {
			width: 320rpx;
			height: 214rpx;
			margin-bottom: 24rpx;
		}
	}
</style>